#ifndef _SPEED_MAP_H_
#define _SPEED_MAP_H_

#define NUM_MAP_TEXTURES 26

typedef struct MapTile
{
	short floor,roof,actualroof;
	unsigned char floorcol,roofcol;
	unsigned char darkness,gate;
	unsigned char textures[4];
} MapTile;

typedef struct Map
{
	int w,h;
	MapTile *tiles;
	int start_x,start_y,start_angle;
#ifndef NO_MAP_LOADING
	char texturenames[NUM_MAP_TEXTURES][32];
#else
	void *texturedata[NUM_MAP_TEXTURES];
#endif
} Map;

#ifndef NO_MAP_LOADING
int LoadMap(Map *map,char *mapfile);
void FreeMap(Map *map);
#endif

int MapFloor(Map *m,int x,int y);
int MapRoof(Map *m,int x,int y);
int MapGate(Map *m,int x,int y);

#endif
